import request from '@/utils/request'

// 调取部门列表详情接口
export const getDashboard = () => {
  return request({
    url: '/company/department'
  })
}

// 调取部门负责人接口
export const getManagerList = () => {
  return request({
    url: '/sys/user/simple'
  })
}
// 调取新增部门的接口
export const addDepartment = data => {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 调取获取部门详情接口
export const getDepartmentDetail = id => {
  return request({
    url: `/company/department/${id}`
  })
}
// 修改部门详细接口
export const modifyDepartment = data => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}
// 删除部门详情接口
export const deleteDepartment = id => {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
